<?php if(!empty($lan_default)&& !empty($lan_to_translate)):?>
 <?php echo form_open('administrator/setting/translate/save') ?>
<table class="table table-striped table-bordered table-condensed">
    <thead>
        <tr>
            <th align="center"><?php echo $lan_default->lang_name?></th>
            <th align="center">
                <?php echo $lan_to_translate->lang_name ?>
            </th>
        </tr>
        </thead>
    <tr>
        <td>
            Category Name:
            
            <?php   $title = $this->_global->_unserialize($category->cat_name);
                    echo isset($title[$this->session->userdata('lan')])?$title[$this->session->userdata('lan')]['title']:"Không tồn tại tiêu đề danh mục với ngôn ngữ hiện tại";
             ?>
        </td>
           
            <td align="center">
                <input type="text" value="<?php if(isset($title[$lang]['title'])) echo $title[$lang]['title'] ?>" name="cat_name" id="cat_name" />
            </td> 
    </tr>
    <tr>
        <td>
            Category Description:
            
            <?php   $desc = $this->_global->_unserialize($category->cat_desc);
                    echo isset($desc[$this->session->userdata('lan')])?$desc[$this->session->userdata('lan')]['cat_desc']:"Không tồn tại tiêu đề danh mục với ngôn ngữ hiện tại";
             ?>
        </td>
           
            <td align="center">
                <input type="text" value="<?php if(isset($desc[$lang]['cat_desc'])) echo $desc[$lang]['cat_desc'] ?>" name="cat_desc" id="cat_desc" />
            </td> 
    </tr>
</table>
<a href="<?php echo base_url().'/administrator/setting/translate/category/'?>" class="btn">Cancel</a>
<input type="submit" class="btn btn-prymary" value="Update" />
<input type="hidden" name="action"  value="<?php echo $action ?>" id="action" />
<input type="hidden" name="lang"  value="<?php echo $lang ?>" id="action" />
<input type="hidden" name="cat_id"  value="<?php echo $category->cat_id?>" id="cat_id" />
 </form>
<?php else:?>
<?php redirect('administrator/setting/translate/category/');
    endif;
?>